# OLD/DEPRECATED

#physical command line to place down

# commands at -160 4 105
function id/main
scoreboard players set @a egg_item 0
scoreboard players set @a exp_bottle 0
scoreboard players set @a egg_throw 0
scoreboard players set @a ender_pearl 0

# begin egg item
clear @a[scores={id=1}] spawn_egg -1 0
cond: scoreboard players set @a[scores={id=1}] egg_item 1
clear @a[scores={id=2}] spawn_egg -1 0
cond: scoreboard players set @a[scores={id=2}] egg_item 1
clear @a[scores={id=3}] spawn_egg -1 0
cond: scoreboard players set @a[scores={id=3}] egg_item 1
clear @a[scores={id=4}] spawn_egg -1 0
cond: scoreboard players set @a[scores={id=4}] egg_item 1
clear @a[scores={id=5}] spawn_egg -1 0
cond: scoreboard players set @a[scores={id=5}] egg_item 1
clear @a[scores={id=6}] spawn_egg -1 0
cond: scoreboard players set @a[scores={id=6}] egg_item 1
clear @a[scores={id=1}] egg -1 0

# begin egg throw
clear @a[scores={id=1}] egg -1 0
cond: scoreboard players set @a[scores={id=1}] egg_throw 1
clear @a[scores={id=2}] egg -1 0
cond: scoreboard players set @a[scores={id=2}] egg_throw 1
clear @a[scores={id=3}] egg -1 0
cond: scoreboard players set @a[scores={id=3}] egg_throw 1
clear @a[scores={id=4}] egg -1 0
cond: scoreboard players set @a[scores={id=4}] egg_throw 1
clear @a[scores={id=5}] egg -1 0
cond: scoreboard players set @a[scores={id=5}] egg_throw 1
clear @a[scores={id=6}] egg -1 0
cond: scoreboard players set @a[scores={id=6}] egg_throw 1

# exp bottle
clear @a[scores={id=1}] experience_bottle -1 0
cond: scoreboard players set @a[scores={id=1}] exp_bottle 1
clear @a[scores={id=2}] experience_bottle -1 0
cond: scoreboard players set @a[scores={id=2}] exp_bottle 1
clear @a[scores={id=3}] experience_bottle -1 0
cond: scoreboard players set @a[scores={id=3}] exp_bottle 1
clear @a[scores={id=4}] experience_bottle -1 0
cond: scoreboard players set @a[scores={id=4}] exp_bottle 1
clear @a[scores={id=5}] experience_bottle -1 0
cond: scoreboard players set @a[scores={id=5}] exp_bottle 1
clear @a[scores={id=6}] experience_bottle -1 0
cond: scoreboard players set @a[scores={id=6}] exp_bottle 1

# ender pearl
clear @a[scores={id=1}] ender_pearl -1 0
cond: scoreboard players set @a[scores={id=1}] ender_pearl 1
clear @a[scores={id=2}] ender_pearl -1 0
cond: scoreboard players set @a[scores={id=2}] ender_pearl 1
clear @a[scores={id=3}] ender_pearl -1 0
cond: scoreboard players set @a[scores={id=3}] ender_pearl 1
clear @a[scores={id=4}] ender_pearl -1 0
cond: scoreboard players set @a[scores={id=4}] ender_pearl 1
clear @a[scores={id=5}] ender_pearl -1 0
cond: scoreboard players set @a[scores={id=5}] ender_pearl 1
clear @a[scores={id=6}] ender_pearl -1 0
cond: scoreboard players set @a[scores={id=6}] ender_pearl 1

execute @e[type=item] ~ ~ ~ function inventory/regive
function switch/handler
execute @a[scores={egg_item=0,cooldown=..0}] ~ ~ ~ function cooldown/check
function inventory/handler
function master
tag @r add check

# check
clear @a[tag=check,scores={item_0=0}] diamond_pickaxe -1 0
cond: tag @a remove check
clear @a[tag=check,scores={item_0=1}] iron_sword -1 0
cond: tag @a remove check
clear @a[tag=check,scores={item_0=2}] diamond_axe -1 0
cond: tag @a remove check
clear @a[tag=check,scores={item_0=3}] iron_axe -1 0
cond: tag @a remove check
clear @a[tag=check,scores={item_0=4}] diamond_sword -1 0
cond: tag @a remove check

# give back if player does not have the item and has the class item score
give @a[tag=check,scores={item_0=0}] diamond_pickaxe
give @a[tag=check,scores={item_0=1}] iron_sword
give @a[tag=check,scores={item_0=2}] diamond_axe
give @a[tag=check,scores={item_0=3}] iron_axe
give @a[tag=check,scores={item_0=4}] diamond_sword
tag @a remove check

# now check the second item
tag @r add check
clear @a[tag=check,scores={item_1=0}] crossbow -1 0
cond: tag @a remove check
clear @a[tag=check,scores={item_1=3}] bow -1 0
cond: tag @a remove check

# give back again
give @a[tag=check,scores={item_1=1}] crossbow
give @a[tag=check,scores={item_1=3}] bow
tag @a remove check